﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using DKT.WeiXinAPI.Factory;

namespace DKT.WeiXinAPI.Message
{
    /// <summary>
    /// 新闻消息
    /// </summary>
    public class News : Factory.AbstractMessage
    {
        public override MessageBody Reply()
        {
            throw new NotImplementedException();
        }


        [Serializable]
        [XmlRoot("xml")]
        public class Response : Factory.AbstractMessage.MessageBody
        {
            public Response() : base()
            {
                this.MsgType = "news";
            }
            public string ArticleCount { get; set; }

            [XmlArray("Articles")]
            [XmlArrayItem("item")]
            public List<item> Articles { get; set; }

        }

        [Serializable]
        public class item
        {
            public string Title { get; set; }
            public string Description { get; set; }
            public string PicUrl { get; set; }
            public string Url { get; set; }
        }
    }
}
